package tgc.rj.zz.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;

import tgc.rj.zz.custom.CommonService;
import tgc.rj.zz.entity.Accredit;
import tgc.rj.zz.repository.AccreditRepository;

@Service
public class AccreditService extends CommonService<Accredit, Integer> {
	@Autowired
	private AccreditRepository accreditDAO;

	public Page<Accredit> findByLesseeLesseeAdminId(Integer id, Pageable pageable) {
		return accreditDAO.findByLesseeLesseeAdminId(id, pageable);
	}

	public Page<Accredit> findByLesseeLesseeAdminId(Integer id, Specification<Accredit> buildSpes, Pageable pageable) {
		return accreditDAO.findByLesseeLesseeAdminId(id, buildSpes, pageable);
	}
}
